import java.io.*;
import java.net.*;
public class UDPBind
{
	public static void main(String args[]) throws IOException{
		DatagramSocket socket = new DatagramSocket(4567);
		byte[] recvBuf = new byte[1024];
		DatagramPacket recvPacket = new DatagramPacket(recvBuf , recvBuf.length);
		while(true){
			socket.receive(recvPacket);
			String recvStr = new String(recvPacket.getData() , 0 ,recvPacket.getLength());
			System.out.println(recvStr);
		}
	}
}